package main

import (
	"fmt"
	beego "github.com/beego/beego/v2/server/web"
	log "github.com/cihub/seelog"
	"matching/process"
	_ "matching/routers"
)

func main() {
	logger, err := log.LoggerFromConfigAsFile("conf/log.xml")

	if err != nil {
		fmt.Println("parse log.xml error")
		panic(err)
	}

	log.ReplaceLogger(logger)

	defer log.Flush()
	log.Infof("welcome to matching!")

	go func() {
		process.Init()
	}()
	beego.Run()
}